package bank.soap.server;

import java.io.IOException;

import bank.Account;
import bank.InactiveException;
import bank.OverdrawException;

import javax.jws.WebParam;
import javax.jws.WebService;

@WebService
public interface BankService {
	void deposit(@WebParam(name = "number") String number,
				 @WebParam(name = "amount") double amount) throws IllegalArgumentException, IOException, InactiveException;
	void withdraw(@WebParam(name = "number") String number,
				  @WebParam(name = "amount") double amount) throws IllegalArgumentException, IOException, OverdrawException, InactiveException;
	void transfer(@WebParam(name = "from") String a,
				  @WebParam(name = "to")String b,
				  @WebParam(name = "amount")double amount) throws InactiveException, OverdrawException, IOException;

	String createAccount(@WebParam(name = "owner") String owner) throws IOException;
	boolean removeAccount(@WebParam(name = "number") String number) throws IOException;
	Object[] getAccountNumbers();
	
	String getOwner(@WebParam(name = "number") String number) throws IOException;
	boolean isActive(@WebParam(name = "number") String number) throws IOException;
	double getBalance(@WebParam(name = "number") String number) throws IOException;
}
